<?php echo $this->error($this);?>
<script type="text/javascript">
<!--
function checkForm() {
	spanError = document.getElementById('error');
	var checkRegExp = new RegExp("^[ \t]*$");
	var user = document.getElementById('user');
	if ((!user.users_password.value.length || !user.users_password2.value.length)
		&& !user.users_id) {
		spanError.innerHTML = "<?php echo T_('Password empty.');?>";
		spanError.className = "usvn_error";
		return false;
	}
	if (user.users_password.value != user.users_password2.value) {
		spanError.innerHTML = "<?php echo T_('Password incorrect (not the same).');?>";
		spanError.className = "usvn_error";
		return false;
	}
	if (user.users_password.value.length < 8 && (!user.users_id ||
		user.users_password.value.length >= 1)) {
		spanError.innerHTML = "<?php echo T_('Password incorrect (need more 8 characters).');?>";
		spanError.className = "usvn_error";
		return false;
	}
	spanError.innerHTML = '';
	spanError.className = "";
	return true;
}
-->
</script>
<form id="user" class="usvn_form" method="post" action="<?php echo $this->url(array("action" => "save")) ?>">
	<fieldset>
		<legend class="usvn_legend">
			<?php echo T_("My account"); ?>
		</legend>
		<label for="users_password"><?php echo T_("Actual password"); ?><span class="usvn_require">*</span>:<br />
			<?php echo $this->formPassword('users_password',  null); ?>
		</label>
		<br />
		<label><?php echo T_("New password"); ?>:<br />
			<?php echo $this->formPassword('users_new_password',  null); ?>
			<?php echo $this->formPassword('users_new_password2',  null); ?>
		</label>
		<br />
		<label><?php echo T_("Lastname"); ?>:<br />
			<?php echo $this->formText('users_lastname', $this->user->lastname, array('maxlength' => 100)); ?></label>
		<br />
		<label><?php echo T_("Firstname"); ?>:<br />
			<?php echo $this->formText('users_firstname', $this->user->firstname, array('maxlength' => 100)); ?>
		</label>
		<br />
		<label><?php echo T_("Email"); ?>:<br />
			<?php echo $this->formText('users_email', $this->user->email, array('maxlength' => 150)); ?>
		</label>
		<br />
		<?php echo $this->formSubmit('submit', T_("Submit"), array("onclick" => 'return checkForm();')); ?>
	</fieldset>
</form>
<br />
